<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>（司马招聘）招聘信息</title>
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="format-detection" content="telephone=no" />
    <link rel="stylesheet" href="{SITE_THEME}css/style.css" />
    <link rel="stylesheet" href="{SITE_THEME}css/jquery.bxslider.css" />
    <script type="text/javascript" src="{SITE_THEME}js/jquery.js"></script>
    <script type="text/javascript" src="{SITE_THEME}js/jquery.bxslider.min.js"></script>
</head>
<body class="bg pad">
<div class="banner top_slide_wrap">
    <ul class="bxslider">
        <li>
            <a href="javascript:;" target="_blank"><img src="{$pic['pic_photo1']}" alt="banner"></a>
        </li>
        <li>
            <a href="javascript:;" target="_blank"><img src="{$pic['pic_photo2']}" alt="banner"></a>
        </li>
        <li>
            <a href="javascript:;" target="_blank"><img src="{$pic['pic_photo3']}" alt="banner"></a>
        </li>
    </ul>
    <script type="text/javascript">
        $(function () {
            $(".banner .bxslider").bxSlider({
                auto: true,
                prevSelector: $(".top_slide_wrap .op_prev")[0],
                nextSelector: $(".top_slide_wrap .op_next")[0],
                pause: 6e3
            });
        });
    </script>

</div>
<nav class="sel_nav">
    <ul>
        <li>
            <a href="javascript:;">
                <select name="position_id" id="position_id">
                    <option value="" selected="selected">所有职位</option>
                    {loop $position_list $t}
                    <option {if $position_id==$t[position_id]}selected{/if} value="{$t['position_id']}">{$t[position_name]}</option>
                    {/loop}
                </select>
            </a>
        </li>
        <li>
            <a href="javascript:;">
                <select name="work_id" id="work_id">
                    <option value="" selected="selected">所有工种</option>
                    {loop $work $w}
                    <option {if $work_id==$w[work_id]}selected{/if} value="{$w[work_id]}">{$w[work_name]}</option>
                    {/loop}
                </select>
            </a>
        </li>
        <li>
            <a href="javascript:;">
                <select name="area_id" id="area_id">
                    <option value="">所有区域</option>
                    {loop $arr $a}
                    <option {if $area_id==$a}selected{/if}>{$a}</option>
                    {/loop}
                </select>
            </a>
        </li>
        <li>
            <a href="javascript:;">
                <select id="search_id">
                    <option value="" selected="selected">智能检索</option>
                    <option {if $search_id==1}selected{/if} value="1">最新发布</option>
                    <option {if $search_id==2}selected{/if} value="2">热门发布</option>
                </select>
            </a>
        </li>
    </ul>
</nav>
<section class="flist">
    <ul id="jobs_list">
        {loop $result $t}
        <li>
            <img src="{SITE_THEME}img/tou2.png" class="tou">
            <div class="text" style="width:60%;">
                <h3>{$t['jobs_name']}</h3>
                <p>{$t['jobs_sex']==1?'男':'女'}、{$t['jobs_age']}</p>
                <p>{$t['jobs_area']}</p>
            </div>
            <div class="ep" style="width:40%;">
                {php
                $arr = explode(',',$t['jobs_position']);
                }
                <?php $p=0;?>
                <h3>
                    {loop $arr $value}
                    {$position_arr[$value['jobs_position']]}
                    {if $p < count($arr)-1 }
                    /
                    {/if}
                    <?php $p++;?>
                    {/loop}
                </h3>
                <a href="javascript:;">立即应聘</a>
            </div>
        </li>
        {/loop}
    </ul>
    <a href="javascript:;" class="more">加载更多</a>
</section>

<footer class="footer">
    <a href="{url('zhaopin/jobs_edit')}">
        <img src="{SITE_THEME}img/icon2.png">
        <p>发布招聘</p>
    </a>
</footer>
<div class="alert">
    <div class="tan">
        <div class="txt">
            <img src="{SITE_THEME}img/icon3.png">
            <span>抱歉！您还未支付
					支付完成后才可查看</span>
        </div>
        <div class="aa">
            <a href="javascript:;" class="qu" onclick="hide_alert()">取消</a>
            <a href="../pay_need.html" class="sure">去支付</a>
        </div>

    </div>

</div>
<script>
    var page = 0;
    var pagetotal;
    getdata();
    function getdata() {
        page++;
        $.ajax({
            'url': 'index.php?c=zhou_ajax&a=zhou_jobs_ajax',
            'type': 'post',
            'dataType': 'json',
            'async': false,
            'data': {
                'page': page
            },
            success: function (data) {
                console.log(data);
                for (var i = 0; i < data.str.length; i++) {
                    var str = '<li><img src="{SITE_THEME}img/tou2.png" class="tou"><div class="text"><h3>' + data.str[i].jobs_position + '</h3><p>司马招聘</p><p>深圳宝安区XX镇</p></div><div class="ep"><h3>3000-5000</h3><a href="javascript:;">立即应聘</a></div></li>';
                    $('#jobs_list').append(str);
                }
                pagetotal = data.countpage;
            }
        })
    }
    $(window).scroll(function () {
        var scrollTop = $(this).scrollTop();
        var scrollHeight = $(document).height();
        var windowHeight = $(this).height();
        var gocheng = parseInt(scrollTop) + parseInt(windowHeight);
        if (gocheng == scrollHeight) {
            if (page > pagetotal) {
                // alert('到底拉');
            } else {
                getdata();
            }
        }
        ;
    })
</script>
<script>
    $(".flist ul li .ep a").click(function () {
        $(".alert").show()
    })
    function hide_alert() {
        $(".alert").hide()
    }
    $('#position_id').change(function () {
        location.href = "index.php?c=zhaopin&a=jobs_list&typeid={$typeid}&position_id="+$(this).val()+"&work_id={$work_id}&area_id={$area_id}&search_id={$search_id}";
    })
    $('#work_id').change(function () {
        location.href = "index.php?c=zhaopin&a=jobs_list&typeid={$typeid}&position_id={$position_id}&work_id="+$(this).val()+"&area_id={$area_id}&search_id={$search_id}";
    })
    $('#area_id').change(function () {
        location.href = "index.php?c=zhaopin&a=jobs_list&typeid={$typeid}&position_id={$position_id}&work_id={$work_id}&area_id="+$(this).val()+"&search_id={$search_id}";
    })
    $('#search_id').change(function () {
        location.href = "index.php?c=zhaopin&a=jobs_list&typeid={$typeid}&position_id={$position_id}&work_id={$work_id}&area_id={$area_id}&search_id="+$(this).val();
    })
</script>
</body>
</html>
